package bog

class LoginTagLib {
    def loginToggle = {
//        out << "<div>"
        if (session.user) {
            out << "Welcome ${session.user.username}.   "
            out << "<a href='${createLink(controller:'user', action:'logout')}'>"
            out << "Logout </a>"
        } else {
            out << "<a href='#modal-login' data-toggle='modal'>Login</a>"
        }
//        out << "</div><br/>"
    }
}
